﻿<phone:PhoneApplicationPage
    x:Class="OnlineMovies.Views.Advertisement"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      xmlns:inputtoolkit="clr-namespace:MarkHeath.StarRating;assembly=MarkHeath.StarRating"
    xmlns:UI="clr-namespace:Microsoft.Advertising.Mobile.UI;assembly=Microsoft.Advertising.Mobile.UI"
    xmlns:AdRotator="clr-namespace:AdRotator;assembly=AdRotator"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d"
    shell:SystemTray.IsVisible="False" Loaded="Advertisement_Loaded">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Gray">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel Grid.Row="0" Margin="12,17,0,28">
            <!--<TextBlock Text="MY APPLICATION" Style="{StaticResource PhoneTextNormalStyle}"/>-->
            <TextBlock x:Name="tblkTitle" Margin="9,-7,0,0" FontSize="24" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
                <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Grid.Row="0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="115"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="190"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Image Grid.Column="0" Grid.Row="0" x:Name="imgMovie" VerticalAlignment="Top" Width="100" Height="170" />
                <StackPanel Grid.Column="1" Grid.Row="0" Margin="15,0,0,0" Height="190">
                    <TextBlock x:Name="tblkTitle1" FontSize="24" FontWeight="Bold" TextWrapping="Wrap" Foreground="White" Margin="10,0,0,0"></TextBlock>
                    <StackPanel x:Name="Ratestack" Margin="10,10,0,0" Orientation="Horizontal">
                        <inputtoolkit:StarRatingControl Name="rate" Rating="{Binding Rating}"  Tag="{Binding MovieId}"  NumberOfStars="5" Height="25" Width="139" MouseLeftButtonDown="rate_MouseLeftButtonDown" ></inputtoolkit:StarRatingControl>
                        <TextBlock x:Name="tblRelease" FontSize="22" Margin="70,0,0,0" Foreground="White"></TextBlock>
                    </StackPanel>

                </StackPanel>
            </Grid>

            <StackPanel  x:Name="advisible"   HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Row="1">
                    <TextBlock x:Name="elapsedtimetblk" FontSize="18" Margin="0,0,0,0" TextWrapping="Wrap"></TextBlock>
                    
                    <StackPanel Orientation="Vertical" Margin="0,300,0,0" >
                        <UI:AdControl Height="80" Width="480" 
                                   x:Name="AdControl" 
                                 ApplicationId="{StaticResource misappid}"
AdUnitId="{StaticResource misuid}"/>
                        <AdRotator:AdRotatorControl AdHeight="80" AdWidth="480" Margin="0,30,0,0"
                                   x:Name="AdRotator12duplex" 
                                 
                                   />
                       
                    </StackPanel>
                </StackPanel>

          
        </Grid>
    </Grid>

</phone:PhoneApplicationPage>